
#pragma once


namespace __OCF_PROXY__ 
{


using namespace __OCF_BASE__;

template <class NC>
class CUserToGateway
{
	typedef TYPE_LIST07(BYTE,BYTE*,USHORT,char,char*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnCharLoading__ = 151,
		__ENUM_FUNCTION_TYPE_fnCharCreate__ = 152,
		__ENUM_FUNCTION_TYPE_fnCharDelete__ = 153,
		__ENUM_FUNCTION_TYPE_fnCharSelect__ = 154,

	};
	typedef NC _N_CLI_T;
public:
	CUserToGateway(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
	}
	virtual ~CUserToGateway()
	{
	}
	CUserToGateway& operator =(const CUserToGateway& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;

		return *this;
	}
	long fnCharLoading(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(151)).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
	long fnCharCreate(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, const BYTE bySlot,const int nLenCharName,const char * pszCharName,const char nGender)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(152)).Push(bySlot).Push(nLenCharName,pszCharName).Push(nGender).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
	long fnCharDelete(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, const BYTE bySlot)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(153)).Push(bySlot).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
	long fnCharSelect(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, const BYTE bySlot)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(154)).Push(bySlot).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
public:
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }

private:
	ULONG m_ulLenSndBuff;
	ULONG m_ulLenRcvBuff;
	void* m_pSndBuff;
	void* m_pRcvBuff;
	_N_CLI_T* m_pcNc;
};

}
#pragma once


namespace __OCF_PROXY__ 
{


using namespace __OCF_BASE__;

template <class NC>
class CGatewayToUser
{
	typedef TYPE_LIST07(BYTE,BYTE*,USHORT,char,char*,int,int*) _OCF_PROXYSTUB_TYPELIST_T;
	enum __ENUM_PROXYSTUB_FUNCTION_TYPE__
	{
		__ENUM_FUNCTION_TYPE_fnResultCharLoading__ = 551,
		__ENUM_FUNCTION_TYPE_fnResultCharCreate__ = 552,
		__ENUM_FUNCTION_TYPE_fnResultCharDelete__ = 553,
		__ENUM_FUNCTION_TYPE_fnResultCharSelect__ = 554,

	};
	typedef NC _N_CLI_T;
public:
	CGatewayToUser(_N_CLI_T* pcNc)
		:m_pcNc(pcNc)
	{
		m_ulLenSndBuff = 0;
		m_pSndBuff = NULL;
		m_ulLenRcvBuff = 0;
		m_pRcvBuff = NULL;
	}
	virtual ~CGatewayToUser()
	{
	}
	CGatewayToUser& operator =(const CGatewayToUser& cFrom)
	{
		m_pcNc = cFrom.m_pcNc;
		m_ulLenSndBuff = cFrom.m_ulLenSndBuff;
		m_pSndBuff = cFrom.m_pSndBuff;
		m_ulLenRcvBuff = cFrom.m_ulLenRcvBuff;
		m_pRcvBuff = cFrom.m_pRcvBuff;

		return *this;
	}
	long fnResultCharLoading(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, const BYTE byRes,const int nLenCharData,const char * pCharData)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(551)).Push(byRes).Push(nLenCharData,pCharData).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
	long fnResultCharCreate(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, const BYTE byRes)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(552)).Push(byRes).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
	long fnResultCharDelete(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, const BYTE byRes)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(553)).Push(byRes).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
	long fnResultCharSelect(const ULONG _Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, const ULONG _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_[], const ULONG _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_[], const BYTE _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, const BYTE byRes)
	{
		COut<_OCF_PROXYSTUB_TYPELIST_T> cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_(m_ulLenSndBuff, m_pSndBuff);

		if (FALSE == cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.Push(static_cast<USHORT>(554)).Push(byRes).IsValid()) return -1;

		return m_pcNc->Send(_Cnt_6489E36B_FE72_4444_A8F1_25651607C29D_, _aul_Bind_2EE5D0E9_E447_4b0a_A4A4_E3651F6B6465_, _aul_Identity_36A0FC71_7800_4156_B52D_A299FDEB5A25_, _by_ServiceType_9A356872_9AD9_4769_8A6A_F8A4CE471567_, cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetDataLength(), cTmpOut_F74FAFA4_1595_44e4_A14C_6181269690D4_.GetStartDataPtr());
	}
public:
	inline void SetProxyInfo(ULONG ulLenSndBuff, void* pSndBuff, ULONG ulLenRcvBuff = 0, void* pRcvBuff = NULL) { m_ulLenSndBuff = ulLenSndBuff; m_pSndBuff = pSndBuff; m_ulLenRcvBuff = ulLenRcvBuff; m_pRcvBuff = pRcvBuff; }

private:
	ULONG m_ulLenSndBuff;
	ULONG m_ulLenRcvBuff;
	void* m_pSndBuff;
	void* m_pRcvBuff;
	_N_CLI_T* m_pcNc;
};

}